﻿<UserControl x:Class="SilverlightSphereControl.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:local="clr-namespace:SilverlightSphereControl"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"
    Loaded="UserControl_Loaded" >
  <Grid x:Name="LayoutRoot">
        <Grid.ColumnDefinitions >
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <StackPanel Grid.Column="1" Width="200" >
            <Button Content="Random" Click="RandomButton_Click" />
            <Button Content="Checkered" Click="CheckeredButton_Click" />
            <Button Content="Columns" Click="ColumnsButton_Click" />
            <Button Content="Rows" Click="RowsButton_Click" />
            <Button Content="Vertical" Click="VerticalButton_Click" />
            <Button Content="Horizontal" Click="HorizontalButton_Click" />
            <Button Content="Add" Click="AddButton_Click" />
            <Button Content="Remove" Click="RemoveButton_Click" />
            <Rectangle Name="RotationStatusRectangle" Height="30" Fill="Green" />
        </StackPanel>
        <local:SphereControl Name="VideoSphereControl" DispersalPattern="Checkered"  Grid.Column="0" Grid.Row="0" TargetChanging="SphereControl_TargetChanging" TargetChanged="SphereControl_TargetChanged" Margin="20" >

            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />
            <MediaElement Source="/Media/f355_nsxs0_48kbps.wmv" Width="100" Height="100" />


        </local:SphereControl>
        <local:SphereControl Name="ImageSphereControl" DispersalPattern="Checkered"  Grid.Column="2" Grid.Row="0" TargetChanging="SphereControl_TargetChanging" TargetChanged="SphereControl_TargetChanged" Margin="20" >

            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1_initial.jpg"  >
                <Image.Effect>
                    <DropShadowEffect BlurRadius="100" Color="Red" ShadowDepth="0"/>
                </Image.Effect>
            </Image>
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />
            <Image Width="50" Height="50" Source="Media/F1.jpg" />





        </local:SphereControl>

        <local:SphereControl Name="RectangleSphereControl" DispersalPattern="Checkered"  Grid.Column="0" Grid.Row="1" TargetChanging="SphereControl_TargetChanging" TargetChanged="SphereControl_TargetChanged" Margin="20" >

            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="Red" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />


        </local:SphereControl>

        <local:SphereControl Name="WorldSphereControl" DispersalPattern="Manual"  Grid.Column="1" Grid.Row="1" TargetChanging="SphereControl_TargetChanging" TargetChanged="SphereControl_TargetChanged" Margin="20" >

            <Image Source="Media/NorthAmerica.png" Width="178" Height="129" >
                <Image.Projection>
                    <PlaneProjection LocalOffsetZ="150" RotationY="-50" RotationX="-23"/>
                </Image.Projection>
            </Image>

            <Image Source="Media/SouthAmerica.png" Width="52" Height="98" >
                <Image.Projection>
                    <PlaneProjection LocalOffsetZ="150" RotationY="-61" RotationX="23"/>
                </Image.Projection>
            </Image>

            <Image Source="Media/Asia.png" Width="184" Height="134" >
                <Image.Projection>
                    <PlaneProjection LocalOffsetZ="150" RotationY="80" RotationX="-25"/>
                </Image.Projection>
            </Image>

            <Image Source="Media/Europe.png" Width="75" Height="87" >
                <Image.Projection>
                    <PlaneProjection LocalOffsetZ="150" RotationY="118" RotationX="-35"/>
                </Image.Projection>
            </Image>

            <Image Source="Media/Africa.png" Width="77" Height="100" >
                <Image.Projection>
                    <PlaneProjection LocalOffsetZ="150" RotationY="120" RotationX="0"/>
                </Image.Projection>
            </Image>

            <Image Source="Media/Australia.png" Width="45" Height="47" >
                <Image.Projection>
                    <PlaneProjection LocalOffsetZ="150" RotationY="70" RotationX="15"/>
                </Image.Projection>
            </Image>

        </local:SphereControl>


        <local:SphereControl Name="SphereSphereControl" DispersalPattern="Checkered"  Grid.Column="2" Grid.Row="1" TargetChanging="SphereControl_TargetChanging" TargetChanged="SphereControl_TargetChanged" Margin="20" >

            <local:SphereControl Name="InnerSphereControl1" DispersalPattern="Checkered"  TargetChanging="SphereControl_TargetChanging" TargetChanged="SphereControl_TargetChanged" Width="100" Height="100" >
                <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Red" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="White" Stroke="Black" Margin="0" Width="50" Height="50" />
            </local:SphereControl>


            <local:SphereControl Name="InnerSphereControl2" DispersalPattern="Checkered" TargetChanging="SphereControl_TargetChanging" TargetChanged="SphereControl_TargetChanged" Width="100" Height="100" >
                <Rectangle Fill="Yellow" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Yellow" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Yellow" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Yellow" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Red" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Yellow" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Yellow" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Yellow" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Yellow" Stroke="Black" Margin="0" Width="50" Height="50" />
            </local:SphereControl>

            <local:SphereControl Name="InnerSphereControl3" DispersalPattern="Checkered"  TargetChanging="SphereControl_TargetChanging" TargetChanged="SphereControl_TargetChanged" Width="100" Height="100" >
                <Rectangle Fill="Blue" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Blue" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Blue" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Blue" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Red" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Blue" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Blue" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Blue" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Blue" Stroke="Black" Margin="0" Width="50" Height="50" />
            </local:SphereControl>

            <local:SphereControl Name="InnerSphereControl4" DispersalPattern="Checkered" TargetChanging="SphereControl_TargetChanging" TargetChanged="SphereControl_TargetChanged" Width="100" Height="100" >
                <Rectangle Fill="Green" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Green" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Green" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Green" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Red" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Green" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Green" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Green" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Green" Stroke="Black" Margin="0" Width="50" Height="50" />
            </local:SphereControl>

            <local:SphereControl Name="InnerSphereControl5" DispersalPattern="Checkered"  TargetChanging="SphereControl_TargetChanging" TargetChanged="SphereControl_TargetChanged" Width="100" Height="100" >
                <Rectangle Fill="Purple" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Purple" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Purple" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Purple" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Red" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Purple" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Purple" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Purple" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Purple" Stroke="Black" Margin="0" Width="50" Height="50" />
            </local:SphereControl>

            <local:SphereControl Name="InnerSphereControl6" DispersalPattern="Checkered"  TargetChanging="SphereControl_TargetChanging" TargetChanged="SphereControl_TargetChanged" Width="100" Height="100" >
                <Rectangle Fill="Orange" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Orange" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Orange" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Orange" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Red" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Orange" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Orange" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Orange" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Orange" Stroke="Black" Margin="0" Width="50" Height="50" />
            </local:SphereControl>

            <local:SphereControl Name="InnerSphereControl7" DispersalPattern="Checkered"  TargetChanging="SphereControl_TargetChanging" TargetChanged="SphereControl_TargetChanged" Width="100" Height="100" >
                <Rectangle Fill="Cyan" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Cyan" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Cyan" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Cyan" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Red" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Cyan" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Cyan" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Cyan" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Cyan" Stroke="Black" Margin="0" Width="50" Height="50" />
            </local:SphereControl>

            <local:SphereControl Name="InnerSphereControl8" DispersalPattern="Checkered"  TargetChanging="SphereControl_TargetChanging" TargetChanged="SphereControl_TargetChanged" Width="100" Height="100" >
                <Rectangle Fill="Aquamarine" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Aquamarine" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Aquamarine" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Aquamarine" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Red" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Aquamarine" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Aquamarine" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Aquamarine" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Aquamarine" Stroke="Black" Margin="0" Width="50" Height="50" />
            </local:SphereControl>

            <local:SphereControl Name="InnerSphereControl9" DispersalPattern="Checkered"  TargetChanging="SphereControl_TargetChanging" TargetChanged="SphereControl_TargetChanged" Width="100" Height="100" >
                <Rectangle Fill="Lavender" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Lavender" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Lavender" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Lavender" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Red" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Lavender" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Lavender" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Lavender" Stroke="Black" Margin="0" Width="50" Height="50" />
                <Rectangle Fill="Lavender" Stroke="Black" Margin="0" Width="50" Height="50" />
            </local:SphereControl>

        </local:SphereControl>
    </Grid>
</UserControl>
